import request from '@/utils/request'

// 查询接送站点列表
export function listVehicle(query) {
  return request({
    url: '/logex/vehicle/list',
    method: 'get',
    params: query
  })
}

// 查询接送站点信息详细
export function getVehicle(id) {
  return request({
    url: '/logex/vehicle/' + id,
    method: 'get'
  })
}

// 新增接送站点
export function addVehicle(data) {
  return request({
    url: '/logex/vehicle',
    method: 'post',
    data: data
  })
}

// 修改接送站点
export function updateVehicle(data) {
  return request({
    url: '/logex/vehicle',
    method: 'put',
    data: data
  })
}

// 删除接送站点
export function delVehicle(id) {
  return request({
    url: '/logex/vehicle/' + id,
    method: 'delete'
  })
}

export function changeStatus(data) {
  return request({
    url: '/logex/vehicle/changeStatus',
    method: 'put',
    data: data
  })
}


// 查询车辆信息列表
export function listCar(query) {
  query.pageNum = 1
  query.pageSize = 999
  return request({
    url: '/logex/vehicleCar/list',
    method: 'get',
    params: query
  })
}

// 查询车辆信息详细
export function getCar(id) {
  return request({
    url: '/logex/vehicleCar/' + id,
    method: 'get'
  })
}

// 新增车辆信息
export function addCar(data) {
  return request({
    url: '/logex/vehicleCar',
    method: 'post',
    data: data
  })
}

// 修改车辆信息
export function updateCar(data) {
  return request({
    url: '/logex/vehicleCar',
    method: 'put',
    data: data
  })
}

export function changeStatusCar(data) {
  return request({
    url: '/logex/vehicleCar/changeStatus',
    method: 'put',
    data: data
  })
}

// 删除车辆信息
export function delCar(id) {
  return request({
    url: '/logex/vehicleCar/' + id,
    method: 'delete'
  })
}
